import router from '@system.router';

export default {
  data: {},
  navigateToDetail(e) {
    const { data } = e.target.attr
    let uri = ''
    switch (+data) {
      case 1:
      uri = 'subs/basic/text/index'
      break;
      case 2:
      uri = 'subs/basic/image/index'
      break;
      case 3:
      uri = 'subs/basic/progress/index'
      break;
      case 4:
      uri = 'subs/basic/rating/index'
      break;
      case 5:
      uri = 'subs/basic/span/index'
      break;
      case 6:
      uri = 'subs/basic/marquee/index'
      break;
      case 7:
      uri = 'subs/basic/imagination/index'
      break;
      case 8:
      uri = 'subs/basic/divider/index'
      break;
      case 9:
      uri = 'subs/basic/search/index'
      break;
      case 10:
      uri = 'subs/basic/menu/index'
      break;
      case 11:
      uri = 'subs/basic/chart/index'
      break;
      case 12:
      uri = 'subs/basic/input/index'
      break;
      case 13:
      uri = 'subs/basic/button/index'
      break;
      case 14:
      uri = 'subs/basic/label/index'
      break;
      case 15:
      uri = 'subs/basic/select/index'
      break;
      case 16:
      uri = 'subs/basic/slider/index'
      break;
      case 17:
      uri = 'subs/basic/switch/index'
      break;
      case 18:
      uri = 'subs/basic/textarea/index'
      break;
      case 19:
      uri = 'subs/basic/picker/index'
      break;
      case 20:
      uri = 'subs/basic/pickerview/index'
      break;
      default:
      break
    }
    router.push({
      uri
    });
  },
}
